#include <iostream>
using namespace std;

int main() {
    int n,m;
    cin >> n >> m;
    double sum = 0.0;
    double sump= 0.0;
    for(int i=0;i<n-m;i++){
        int x;
        cin >> x;
        sum+=x;
    }
    sump=sum;
    sum+=m;
    sump+=m*5;
    printf("%.5lf %.5lf",sum/n,sump/n);
    return 0;
}